var express = require('express');
var router = express.Router();
var hotelDao = require("../bin/Dao/hotel.js");
var allcategoryDao = require("../bin/Dao/allCategory.js");



router.post("/allHotel",(req,res)=>{
    allcategoryDao.findOne(req.body)
    .populate("has")
    .then(data=>{
        res.json({err:0,data:data})
    })
})


router.post("/oneMsg",(req,res)=>{
    hotelDao.findOne(req.body)
    .then(data=>{
        res.json({err:0,data:data})
    })
})









module.exports = router;